#include <bits/stdc++.h>
using namespace std;

int main() {
	double volume, sum = 0;
	cin >> volume;
	if (volume < 150) {
		sum = volume * 0.4463;
	} else if (volume > 150 && volume < 400) {
		sum = 150 * 0.4463 + (volume - 150) * 0.4663;
	} else {
		sum = 150 * 0.4463 + (400 - 150) * 0.4663 + (volume - 400) * 0.5663;
	}
	printf("%.1lf", sum);
	return 0;
}